package jfreechart.tsp.ui;

//线段定义
public class Segment {
    public Point start;
    public Point end;

    public Segment(Point start, Point end) {
        this.start = start;
        this.end = end;
    }

    public Segment(double sx, double sy, double ex, double ey) {
        this(new Point(sx, sy), new Point(ex, ey));
    }

    @Override
    public String toString() {
        return "(" + start.x + "," + start.y + ")" + "(" + end.x + "," + end.y + ")";
    }
}
